package com.pug.message.mongoservice.usermessage;

import com.pug.message.mongo.UserMessageMo;
import com.pug.message.mongorepository.UserMessageRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.*;
import org.springframework.stereotype.Service;

/**
 * @author 飞哥
 * @Title: 学相伴出品
 * @Description: 飞哥B站地址：https://space.bilibili.com/490711252
 * 记得关注和三连哦！
 * @Description: 我们有一个学习网站：https://www.kuangstudy.com
 * @date 2022/3/26$ 21:21$
 */
@Service
@Slf4j
public class UserMessageServiceImpl implements IUserMessageService {

    @Autowired
    private UserMessageRepository userMessageRepository;


    @Override
    public UserMessageMo saveMessage(UserMessageMo userMessageMo) {
        userMessageMo.setId(null);
        UserMessageMo userMessageMo1 = userMessageRepository.save(userMessageMo);
        return userMessageMo1;
    }
}
